<?php
/**
 * Created by .
 * User: 小涛
 * Date: 2018/3/26
 * Time: 14:57
 */

namespace app\admin\model;


use think\Model;

/**
 * Class City 中国省市区地址联动表
 * @package app\admin\model
 */
class City extends Model
{
    public static function CityByTid($tid = 0){
        return self::where(["tid" => $tid])
            -> select();
    }

    public static function getName($id = 0){
        return self::where(["id" => $id]) -> find()["name"];
    }
}